function createChat() {
	if($("#chatName").val()==""){
		alert('请输入房间名');
		return;
	}
	//创建房间
	$.ajax({
	 	type : "post",
	 	url :  webHead+"group/create",
	 	contentType: "application/x-www-form-urlencoded;charset=UTF-8",
	 	dataType : "json",
	 	data : {
	 		groupName:$("#chatName").val()
	 	},
	 	beforeSend: function (XMLHttpRequest) {         		
	 		XMLHttpRequest.setRequestHeader(HEAD_USER_ID, getCookie(COOKIE_USER_ID));             
	 	},
	 	success : function(data) {
	 		console.log(data);
	 		if(data.code==RESPONSE_OK){
	 			window.location.href="/"+appName+"/html/chat/chat.html?msgType="+MSG_TYPE_CREATEGROUP+"&groupId="+data.data.groupId;
	 			return;
	 		}
	 		alert("创建失败");
	 	},
	 	error : function(XMLHttpRequest, textStatus, errorThrown) {
	 		alert("请求失败:这真是个悲伤的故事。");
	 	}
	 });
}